/* media gallery */
.rui.media-gallery {
  width: 100%;
  max-width: 100%;
  text-align: center;
  min-height: 150px !important;
  max-height: 100%;
  border-radius: 6px;
  margin-top: 5px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  list-style: none;
  padding: 0;
}

.rui.media-gallery .rui.gallery {
  width: 100%;
  height: auto;
}


// Gallery all images
.rui.media-gallery .gallery-image .img-responsive {
  width: 100%;
}

.rui.media-gallery .gallery-image .video {
  width: 100%;
}

// Gallery Thumbnails
.rui.gallery-thumbnails {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  // justify-content: center;
}

.rui.gallery-thumbnails .gallery-image {
  position: relative;
  flex-basis: 25%;
  padding: 3px;
}

// Media Gallery Admin
.rui.media-gallery .rui.gallery-drop-pane {
  width: 100%;
  height: auto;
}

.gallery-image .rui.badge-container {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;

  .rui.status-badge {
    position: absolute;
    top: -23px;
    right: -23px;
    width: 16px;
    height: 16px;

    .icon-only {

    }
  }
}

.rui.media-gallery .gallery-image.add {
  position: relative;
}

.rui.media-gallery .gallery-image.progress {
  position: relative;
  height: 5px;
  top: -10px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 0px;
  display: block;
}

.rui.media-gallery .gallery-image.add .badge-container {
  position: absolute;;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  padding: 2px;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.rui.media-gallery .gallery-image.gallery-tools {
  visibility: hidden;
  padding: 10px;
  position:absolute;
  bottom:0px;
  right:0px;
}

.rui.media-gallery .gallery-image:hover .gallery-tools {
  visibility: visible;
  opacity: 1;
}

.rui.media-gallery .gallery-image:hover .gallery-tools a {
  color: @gray-dark;
}

.rui.media-gallery .featuredImage {
  & > div {
    height: 100%;
    .gallery-image {
      height: 100%;
    }
  }
}

.rui.media-gallery .gallery-image .img-responsive {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.admin-gallery-image {
  cursor: pointer;

  &:hover {
    background-color: @list-group-hover-bg;
    opacity: 0.7;
  }
}

.gallery-image.no-fade-on-hover,
.admin-gallery-image.no-fade-on-hover {
  &:hover {
    opacity: 1;
  }
}

.zoomed-image-container {
  z-index: 1;
  direction: ltr;
  background-color: @body-bg;
  img {
     object-fit: contain;
  }
}

@media(min-width: 480px) {
  .rtl .zoomed-image-container {
    left: 0% !important;
    right: 100% !important;
    margin-right: 10px;
  }
}
